package com.wcl.demo.db;

import com.wcl.demo.model.entity.CanSendData;
import com.wcl.demo.model.entity.CanSendDataDao;

import java.util.List;

/**
 * Created by dllo on 15/12/3.
 */
public class CanSendHelper {
    private DaoSingleton instance = DaoSingleton.getInstance();
    private CanSendDataDao canSendDataDao;

    public CanSendHelper(){
        this.canSendDataDao=instance.getCanSendDataDao();
    }
    /***
     * 添加数据
     */

    public void saveCanSend(List<CanSendData> canSendDatas) {
        canSendDataDao.insertInTx(canSendDatas);
    }
    /***
     * 删除
     */
    public void deleteAll() {
        canSendDataDao.deleteAll();
    }
    /***
     * 查询
     */
    public List<CanSendData> queryAll() {
        return canSendDataDao.loadAll();
    }



}
